﻿<Page x:Class="Nomad.WebSync.Windows.Pages.Contacts"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="354" Height="424" FontSize="12"
    Loaded="Page_Loaded">
    <DockPanel>
        <UniformGrid DockPanel.Dock="Top" Columns="2" VerticalAlignment="Top" Background="Gainsboro">
            <ComboBox Name="categoriesComboBox" Margin="5" IsReadOnly="True">
                <ComboBoxItem Content="All Contacts" IsSelected="true" Selected="ComboBoxItem_Selected"/>
            </ComboBox>
            <TextBox Name="searchTextBox" Margin="5" Text="Find a name" GotFocus="searchTextBox_GotFocus" LostFocus="searchTextBox_LostFocus" KeyUp="searchTextBox_KeyUp"/>
        </UniformGrid>

        <UniformGrid DockPanel.Dock="Top" Columns="9" VerticalAlignment="Top" Background="White">
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="#ab" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="cde" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="fgh" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="ijk" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="lmn" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="opq" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="rst" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,0,1" Content="uvw" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
            <Label BorderBrush="Black" BorderThickness="1,1,1,1" Content="xyz" Padding="2" HorizontalContentAlignment="Center" Cursor="Hand" MouseDown="Label_MouseDown" MouseUp="Label_MouseUp"/>
        </UniformGrid>

        <ListBox Name="contactsListBox" FontWeight="Bold" Background="White" MouseLeftButtonUp="contactsListBox_MouseLeftButtonUp">            
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="160"/>
                            <ColumnDefinition Width="150"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>

                        <TextBlock Grid.Column="0" Text="{Binding FullName}" TextTrimming="CharacterEllipsis" Margin="0,0,5,0" Cursor="Hand"/>
                        <TextBlock Grid.Column="1" Text="{Binding Info}" TextTrimming="CharacterEllipsis" Margin="0,0,5,0" Cursor="Hand"/>
                        <TextBlock Grid.Column="2" Text="{Binding InfoType}" TextTrimming="CharacterEllipsis" Cursor="Hand"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Edit Contact"/>
                    <MenuItem Header="Remove Contact"/>                    
                    <Separator/>
                    <MenuItem Header="Send (Account)"/>
                </ContextMenu>
            </ListBox.ContextMenu>
        </ListBox>
    </DockPanel>
</Page>
